package com.test.mooan.labama.activity_fragment_boom.base_boom;

import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;

import androidx.annotation.Nullable;

import com.test.mooan.labama.bean_boom.process_boom.ProcessInfo_boom;
import com.test.mooan.labama.bean_boom.product.Product;
import com.test.mooan.labama.constants_boom.Constant_boom;
import com.test.mooan.labama.utils_boom.http_boom.HttpManager_boom;


public abstract class BaseInfoActivity_boom extends BaseActivity_boom {

    public Uri photoUri_boom;

    protected Product product;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        pageTag = ProcessInfo_boom.getInstance().gStepName(0).toUpperCase();
        if (TextUtils.isEmpty(pageTag)) pageTag = getClass().getSimpleName();


        try {
            product = (Product) getIntent().getSerializableExtra("product");
            if (product==null) product = Product.gtInstance(null);
        }catch (Exception e){
            if (Constant_boom.Debug) e.printStackTrace();
        }

    }

    public void onInfoUploadResponse_boom(){
        HttpManager_boom.getInstance().requestUserProcess();
    }

    @Override
    public void onUserProcessResponse() {
        startProcess(product);
        finish();
    }

    @Override
    public void onLoanApplyDetailResponse(){
        super.onLoanApplyDetailResponse();
        finish();
    }


}
